package com.seleniti.enpareja.controller.ui.view;

import java.util.Date;
import java.util.List;
import java.util.Set;

import org.ioc.commons.flowcontrol.actioncontroller.IsExternalAction;
import org.ioc.commons.flowcontrol.eventbus.IsEvent;
import org.ioc.commons.flowcontrol.operationmanager.IsOperation;
import org.ioc.commons.ui.HasEnabled;
import org.ioc.commons.ui.HasLoader;
import org.ioc.commons.ui.HasValue;
import org.ioc.commons.ui.HasVisibility;
import org.ioc.commons.ui.IsView;
import org.ioc.commons.ui.IsViewPresenter;
import org.ioc.commons.ui.features.HasBoards;
import org.ioc.commons.ui.features.IsBoard;

import com.seleniti.enpareja.controller.model.integration.database.domain.WorkShift;
import com.seleniti.enpareja.controller.model.integration.database.domain.WorkShift.Shift;
import com.seleniti.enpareja.controller.ui.view.WorkShiftsView.Board;

public interface WorkShiftsView extends EnParejaView<WorkShiftsView.Event, WorkShiftsView.Operation, WorkShiftsView.Action>,
		HasLoader, HasEnabled, HasBoards<Board> {

	@interface Fires {
		WorkShiftsView.Event[] value();
	}

	@interface Invokes {
		WorkShiftsView.Action[] value();
	}

	@interface Performs {
		WorkShiftsView.Operation[] value();
	}

	public enum Event implements IsEvent {
	}

	public enum Operation implements IsOperation {
		GettingData, Saving, Deleting
	}

	public enum Action implements IsExternalAction {
	}

	public interface Presenter extends IsViewPresenter {

		void onActionModeChanged();

		void onSelectionChanged();

		void onWorkShiftModified();

		void onFilteDateChanged();

		boolean onGoBoardBack();
	}

	public enum ActionMode {
		DELETE_ELEMENT, MODIFY_ELEMENT;
	}

	public enum Board implements IsBoard {
		MAIN_LIST, EDIT_FORM
	}

	void setActionMode(ActionMode mode);

	List<WorkShift> workshiftList();

	ActionMode getActionMode();

	Set<WorkShift> getSelection();

	void showModifyForm(WorkShift toModify);

	void saveModificationForm();

	void hideModificationForm();

	HasValue<Date> date();

	HasValue<Date> filterToDate();

	HasValue<Date> filterFromDate();

	HasValue<Shift> shiftMember1();

	HasValue<Shift> shiftMember2();

	HasValue<String> member1Name();

	HasValue<String> member2Name();

	HasValue<String> commentMember1();

	HasValue<String> commentMember2();

	HasVisibility member1ActionsVisible();

	HasVisibility member2ActionsVisible();

}
